<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/base/stu.js"></script>
<script type="text/javascript">
	$(function() {
		var majorList = ${majorList};
		stuDataGrid("${pageContext.request.contextPath}",majorList);
	});
</script>

<!-- Data List -->
<div class="easyui-layout" fit="true" id="stu-mainBody">
	<div data-options="region:'center',border:false"
		style="padding: 5px; height: 80%">
		<table id="stu-data-list"></table>
	</div>
	
	<!-- 弹出框 -->
	<div id="stu-edit-win" class="imoia_pop" style="width: 440px;">
		<!-- 弹出框标题 -->
		<div class="imoia_pop_title">
			<strong id="stu-win-title">添加学生</strong><span class="imoia_pop_closed"
				onClick="popClosed('stu-edit-win')">关闭</span>
		</div>
		<!-- 弹出框内容 -->
		<form id="stu-info-form" class="ui-form" method="post">
			<div class="imoia_pop_con">
				<input type="hidden" name="id">
				<ul>
					<li><strong>姓名:</strong> <span><input
							class="imoia_intxt easyui-validatebox"
							data-options="required:true,missingMessage:'请输入姓名.'" type="text"
							id="student-name" name="name" /></span></li>
					<li><strong>学号：</strong> <span><input
							class="imoia_intxt easyui-validatebox"
							data-options="required:true,missingMessage:'请输入学号.'" type="text"
							id="student-number" name="number" /></span></li>
					<li><strong>性别：</strong> <span> <select name="sex">
								<option value="2">女</option>
								<option value="1">男</option>
						</select>
					</span></li>
					<li><strong>籍贯：</strong> <span> <input
							class="imoia_intxt easyui-validatebox" type="text" name="origin"
							id="student-origin" style="width: 200px;" />
					</span></li>
					<li><strong>年级：</strong> <span> <input
							class="imoia_intxt easyui-validatebox" type="text" name="grade"
							id="student-grade" style="width: 200px;" />
					</span></li>
					<li><strong>班级：</strong> <span> <input
							class="imoia_intxt easyui-validatebox" type="text"
							name="stuclass" id="student-stuclass" style="width: 200px;" />
					</span></li>
					<li><strong>专业：</strong> <span> <select name="majorId">
								<c:forEach var="major" items="${majorList}" varStatus="status">
									<option value="${major.id}">${major.majorname}</option>
								</c:forEach>
						</select>
					</span></li>
					<li><strong>政治面貌：</strong> <span> <input
							class="imoia_intxt easyui-validatebox" type="text" name="political"
							id="student-political" style="width: 200px;" />
					</span></li>
				</ul>
			</div>
			<div class="imoia_pop_btn">
				<span><input type="button" id="stu-save" value="保存"
					class="imoia_pop_btn_save"
					onClick="stuSave('${pageContext.request.contextPath}/superuser/addOrUpdate.do')" /></span>
				<span><input type="button" id="factory-close" value="关闭"
					class="imoia_pop_btn_closed" onClick="popClosed('stu-edit-win')" /></span>
			</div>
			<div class="imoia_pop_error" id="stu-edit-error">
				<p></p>
			</div>
			<div class="imoia_pop_correct" id="stu-edit-info">
				<p></p>
			</div>
		</form>
	</div>
</div>

